package com.mhc.suzuki.service;

import com.mhc.fiat.api.message.ProcessMessage;
import com.mhc.suzuki.bo.MessageBO;
import com.mhc.suzuki.bo.MessageQueryBO;
import com.mhc.suzuki.bo.SubmitTaskBO;
import com.mhc.suzuki.dal.model.OrderDO;
import com.mhc.suzuki.exception.SuzukiCommonException;

import java.io.IOException;
import java.util.List;

/**
 * Created by HW
 * on 2017/9/7 18:16.
 */
public interface MessageService{

    /**
     * 审核申请过程中对应发送消息方法
     * @param processMessage 用于获取订单信息， 操作
     * @param applyType 申请类型
     * @throws SuzukiCommonException
     * @throws IOException
     */
    void sendMessage(ProcessMessage processMessage, Integer applyType) throws SuzukiCommonException, IOException;

    /**
     * 审核完成后的对应消息发送
     * @param processMessage 用于获取订单信息， 操作
     * @param applyType 申请类型
     * @throws SuzukiCommonException
     * @throws IOException
     */
    void sendEndMessage(ProcessMessage processMessage, Integer applyType) throws SuzukiCommonException, IOException;


    /**
     *
     * @param order
     * @throws SuzukiCommonException
     * @throws IOException
     */
    void sendNoPassMessage(OrderDO order, SubmitTaskBO submitTaskBO) throws SuzukiCommonException, IOException;

    /**
     * 订单征信录入消息发送
     * @param orderNo
     * @throws SuzukiCommonException
     * @throws IOException
     */
    void sendCreditMessage(String orderNo) throws SuzukiCommonException, IOException;

    /**
     * 条件查询消息列表
     * @param messageQueryBO
     * @return
     * @throws SuzukiCommonException
     */
    List<MessageBO> getMessagesByQueryBO(MessageQueryBO messageQueryBO) throws SuzukiCommonException;

    /**
     * 条件查询消息数
     * @param messageQueryBO
     * @return
     * @throws SuzukiCommonException
     */
    Integer getMessagesCountByQueryBO(MessageQueryBO messageQueryBO) throws SuzukiCommonException;
    /**
     * 条件查询消息列表
     * @param messageQueryBO
     * @return
     * @throws SuzukiCommonException
     */
    List<MessageBO> getMessagesNotDeletedByQueryBO(MessageQueryBO messageQueryBO) throws SuzukiCommonException;

    /**
     * 条件查询消息数
     * @param messageQueryBO
     * @return
     * @throws SuzukiCommonException
     */
    Integer getMessagesCountNotDeletedByQueryBO(MessageQueryBO messageQueryBO) throws SuzukiCommonException;

    /**
     * 更改消息状态
     * @param messagesId
     * @param status
     * @return
     * @throws SuzukiCommonException
     */
    boolean changeStatus(Long messagesId, Integer status) throws SuzukiCommonException;

    /**
     * 消息状态批量更改
     * @param messagesIds
     * @return
     * @throws SuzukiCommonException
     */
    boolean changeStatusByList(Long[] messagesIds) throws SuzukiCommonException;


}
